package com.cjq.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cjq.domain.User;
import com.cjq.service.UserService;
import com.cjq.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.sql.Date;
import java.util.List;

/**
*
*/
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User>
implements UserService{

    @Autowired
    private UserMapper userMapper;

//    @Override
//    public List<User> selectAllClock(Date date) {
//        return userMapper.selectAllClock(date);
//    }
//
//    @Override
//    public IPage<User> selectAllClock(Page<?> page, Date date) {
//        return userMapper.selectAllClock(page,date);
//    }
//
//    @Override
//    public List<User> selectAllNoClock(Date date) {
//        return userMapper.selectAllNoClock(date);
//    }
//
//    @Override
//    public IPage<User> selectAllNoClock(Page<?> page, Date date) {
//        return userMapper.selectAllNoClock(page,date);
//    }

    @Override
    public List<User> selectClockByCondition(Date date, User user) {
        return userMapper.selectClockByCondition(date,user);
    }

    @Override
    public IPage<User> selectClockByCondition(Page<?> page, Date date, User user) {
        return userMapper.selectClockByCondition(page,date,user);
    }

    @Override
    public List<User> selectNoClockByCondition(Date date, User user) {
        return userMapper.selectNoClockByCondition(date,user);
    }

    @Override
    public IPage<User> selectNoClockByCondition(Page<?> page, Date date, User user) {
        return userMapper.selectNoClockByCondition(page,date,user);
    }

    @Override
    public IPage<User> selectAccountByPage(Page<User> page,LambdaQueryWrapper<User> wrapper){
        return userMapper.selectPage(page, wrapper);
    }
}
